import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import { GET, POST, PUT, DELETE } from './utils/request.js'
import { getTopIconDistance } from './utils/methods'
import uView from '@/uni_modules/uview-ui'
import pageConfig from '@/config'
import * as utils from './utils/index'
import NavBar from '@/components/nav-bar/index.vue'
import YouScroll from '@/components/you-scroll/index.vue'
import YouPopup from '@/components/you-popup/index.vue'
import YouDetail from '@/components/you-detail/index.vue'
import YouBottomBtn from '@/components/you-bottom-btn/index.vue'
import YouSearch from '@/components/you-search/index.vue'
import YouTabs from '@/components/you-tabs/index.vue'
import YouSideNavigate from '@/components/you-side-navigate/index.vue'
import YouIndexAdress from '@/components/you-index-address/index.vue'
import shareWx from './utils/shareWx'
import amapFile from '@/utils/amap-wx.130.js'

Vue.mixin(shareWx)
Vue.use(uView)

Vue.use(plugins)
Vue.component('NavBar', NavBar)
Vue.component('YouScroll', YouScroll)
Vue.component('YouPopup', YouPopup)
Vue.component('YouDetail', YouDetail)
Vue.component('YouBottomBtn', YouBottomBtn)
Vue.component('YouSearch', YouSearch)
Vue.component('YouTabs', YouTabs)
Vue.component('YouSideNavigate', YouSideNavigate)
Vue.component('YouIndexAdress', YouIndexAdress)
getTopIconDistance()

Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$utils = utils
Vue.prototype.$pageConfig = pageConfig
Vue.prototype.$GET = GET
Vue.prototype.$POST = POST
Vue.prototype.$PUT = PUT
Vue.prototype.$DELETE = DELETE
Vue.prototype.myAmapFun = new amapFile.AMapWX({
	// key: '5ca53a2f5145b60bf2c650390a5a1404'
	key: '48602edcde9d55e1b8f0a9f6f4fe0000'
});

App.mpType = 'app'

const app = new Vue({
  ...App
})

app.$mount()
